package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCompanyReportSuggestMapper;
import com.ruoyi.system.domain.SysCompanyReportSuggest;
import com.ruoyi.system.service.ISysCompanyReportSuggestService;

/**
 * 诊断报告建议模版库Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-19
 */
@Service
public class SysCompanyReportSuggestServiceImpl implements ISysCompanyReportSuggestService 
{
    @Autowired
    private SysCompanyReportSuggestMapper sysCompanyReportSuggestMapper;

    /**
     * 查询诊断报告建议模版库
     * 
     * @param suggestId 诊断报告建议模版库主键
     * @return 诊断报告建议模版库
     */
    @Override
    public SysCompanyReportSuggest selectSysCompanyReportSuggestBySuggestId(Long suggestId)
    {
        return sysCompanyReportSuggestMapper.selectSysCompanyReportSuggestBySuggestId(suggestId);
    }

    /**
     * 查询诊断报告建议模版库列表
     * 
     * @param sysCompanyReportSuggest 诊断报告建议模版库
     * @return 诊断报告建议模版库
     */
    @Override
    public List<SysCompanyReportSuggest> selectSysCompanyReportSuggestList(SysCompanyReportSuggest sysCompanyReportSuggest)
    {
        return sysCompanyReportSuggestMapper.selectSysCompanyReportSuggestList(sysCompanyReportSuggest);
    }

    /**
     * 新增诊断报告建议模版库
     * 
     * @param sysCompanyReportSuggest 诊断报告建议模版库
     * @return 结果
     */
    @Override
    public int insertSysCompanyReportSuggest(SysCompanyReportSuggest sysCompanyReportSuggest)
    {
        sysCompanyReportSuggest.setCreateTime(DateUtils.getNowDate());
        return sysCompanyReportSuggestMapper.insertSysCompanyReportSuggest(sysCompanyReportSuggest);
    }

    /**
     * 修改诊断报告建议模版库
     * 
     * @param sysCompanyReportSuggest 诊断报告建议模版库
     * @return 结果
     */
    @Override
    public int updateSysCompanyReportSuggest(SysCompanyReportSuggest sysCompanyReportSuggest)
    {
        sysCompanyReportSuggest.setUpdateTime(DateUtils.getNowDate());
        return sysCompanyReportSuggestMapper.updateSysCompanyReportSuggest(sysCompanyReportSuggest);
    }

    /**
     * 批量删除诊断报告建议模版库
     * 
     * @param suggestIds 需要删除的诊断报告建议模版库主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyReportSuggestBySuggestIds(Long[] suggestIds)
    {
        return sysCompanyReportSuggestMapper.deleteSysCompanyReportSuggestBySuggestIds(suggestIds);
    }

    /**
     * 删除诊断报告建议模版库信息
     * 
     * @param suggestId 诊断报告建议模版库主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyReportSuggestBySuggestId(Long suggestId)
    {
        return sysCompanyReportSuggestMapper.deleteSysCompanyReportSuggestBySuggestId(suggestId);
    }
}
